#include <stdio.h>
#include <string.h>

using namespace std;

int A[6][4];

enum {
  Front,
  Back,
  Left,
  Right,
  Up,
  Down,
};

enum {
  Green,
  Blue,
  Red,
  Orange,
  White,
  Yellow,
};

const char* GetColorName(int x) {
  switch (x) {
    case Green:
      return "绿";
    case Blue:
      return "蓝";
    case Red:
      return "红";
    case Orange:
      return "橙";
    case White:
      return "白";
    case Yellow:
      return "黄";
    default:
      break;
  }
}

void FillFace(int face, int color) {
  for (int i = 0; i < 4; ++i) {
    A[face][i] = color;
  }
}

void Init() {
  FillFace(Front, Green);
  FillFace(Back, Blue);
  FillFace(Left, Orange);
  FillFace(Right, Red);
  FillFace(Up, White);
  FillFace(Down, Yellow);
}

struct ColorBlk {
  int val[2];
  void Print() {
    printf("BLK %s%s\n", GetColorName(val[0]), GetColorName(val[1]));
  }
};

struct TurnInfo {
  int face;
  int blkid[2];

  void Print() { printf("TI face %d %d %d\n", face, blkid[0], blkid[1]); }

  TurnInfo(int f, int a, int b) {
    face = f;
    blkid[0] = a;
    blkid[1] = b;
  }

  ColorBlk Get() const {
    ColorBlk blk;
    for (int i = 0; i < 2; ++i) {
      blk.val[i] = A[face][blkid[i]];
    }
    return blk;
  }
  void Set(ColorBlk blk) {
    for (int i = 0; i < 2; ++i) {
      A[face][blkid[i]] = blk.val[i];
    }
  }
};
void Show() {
  int x = A[Front][1];
  int y = A[Right][0];
  int z = A[Up][3];
  const int colors[] = {x, y, z};
  for (int i = 0; i < 3; ++i) {
    printf("%s", GetColorName(colors[i]));
  }
  puts("");
}
void TurnFace(TurnInfo info[4]) {
  ColorBlk tmp = info[3].Get();

  for (int i = 3; i > 0; --i) {
    info[i].Set(info[i - 1].Get());
  }
  info[0].Set(tmp);
}

TurnInfo TIF[3][4] = {
    {TurnInfo(Up, 2, 3), TurnInfo(Right, 0, 2), TurnInfo(Down, 2, 3),
     TurnInfo(Left, 0, 2)},  // X
    {TurnInfo(Up, 3, 1), TurnInfo(Back, 1, 3), TurnInfo(Down, 1, 3),
     TurnInfo(Front, 3, 1)},  // Y
    {TurnInfo(Back, 0, 1), TurnInfo(Right, 0, 1), TurnInfo(Front, 0, 1),
     TurnInfo(Left, 1, 0)},  // Z
};

const int Op2Face[] = {Front, Right, Up};

void Do(int op) {
  TurnFace(TIF[op]);
  int face = Op2Face[op];
  int tmp = A[face][3];
  A[face][3] = A[face][1];
  A[face][1] = A[face][0];
  A[face][0] = A[face][2];
  A[face][2] = tmp;
}

int main() {
  freopen("in.txt", "r", stdin);
  Init();
  Show();

  char buf[50];
  scanf("%s", buf);
  int len = strlen(buf);
  for (int i = 0; i < len; ++i) {
    int op = buf[i] - 'x';  // xyz
    Do(op);
    Show();
  }
  // Show();

  return 0;
}